function Mynew(fn, ...argu) {
    let obj = {}
    obj.__proto__ = fn.prototype
    let result = fn.call(obj, ...argu)
    return result = result instanceof Object ? result : obj
}

function _new(fn, ...argu) {
        let obj = {}
        obj.__proto__ = fn.prototype
        fn.call(obj, ...argu)
        return obj
}

function add(a, b) {
    console.log(a + b);
    return Obj = {
        name: 'cg'
    }
    // return 1
}

function Person(name, age) {
    this.name = name
    this.age = age
}
Person.prototype.say = function() {
    console.log('hahaha');
}
let s = Mynew(add, 1, 2)
let b = _new(Person, 1, 2)
console.log(s, b)
b.say()